package com.nbsaas.boot.manufacturing.rest.convert;

import com.nbsaas.boot.manufacturing.data.entity.BomItem;
import com.nbsaas.boot.manufacturing.api.domain.request.BomItemRequest;

import org.springframework.beans.BeanUtils;
import com.nbsaas.boot.rest.api.Converter;
import com.nbsaas.boot.utils.BeanDataUtils;

/**
* BOM项目请求对象转换成实体对象
*/

public class BomItemEntityConvert  implements Converter<BomItem, BomItemRequest> {

    @Override
    public BomItem convert(BomItemRequest source) {
        BomItem result = new BomItem();
        BeanDataUtils.copyProperties(source, result);
        return result;
    }
}

